<template>
  <div class="tabbar">
    <van-tabbar
      v-model="active"
      active-color="#FDD44D"
      inactive-color="#4D4F50"
      @change="onChange"
    >
      <van-tabbar-item replace to="/home" icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item replace to="/member" icon="gem-o">会员</van-tabbar-item>
      <van-tabbar-item replace to="/order" icon="orders-o">订单</van-tabbar-item>
      <van-tabbar-item replace to="/own" icon="user-o">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
import { ref } from '@vue/reactivity'
import { onMounted } from '@vue/runtime-core';
export default {
  props: {
    tab: Number
  },
  setup(props) {
    onMounted(() => {
      console.log(props.tab);
    })
    const active = ref(props.tab);
    return {
      active
    };
  },
};
</script>

<style lang="less" scoped>
</style>